package oop7;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Dvi2 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        try {
            System.out.println("请输入1个数：");
            int a = in.nextInt();
            System.out.println("请输入第二个数：");
            int b = in.nextInt();
            int shang = a / b;
            System.out.println(a + "/" + b + "=" + shang);
        }catch (InputMismatchException e){
            System.out.println("输入错误！");
            e.printStackTrace();//详细的错误原因，错误的源头
        }
        System.out.println("计算结束了");
    }
}
